<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <style>
    .box {
      width: 300px;
      height: 200px;
      border: 1px solid red;
    }
    .box span {
      background: blue;
      margin-left: 10px;
      margin-right: 10px;
      margin-top: 10px;
    }
    /*注意：行内元素只能设置水平的margin值是有效，垂直方式的margin是无效的。*/
  </style>
</head>
<body>
  <div class="box">
    <span>文本内容</span>
    <span>文本内容</span>
    <span>文本内容</span>
    <span>文本内容</span>
    <span>文本内容</span>
    <span>文本内容</span>
    <span>文本内容</span>
    <span>文本内容</span>
    <span>文本内容</span>
    <span>文本内容</span>
  </div>
</body>
</html>